package code.part06_Thread;

/**
 * @author: ZJT
 * @Time: 2021/7/21
 * @Description: 多线程 第一种实现方式
 */
public class P01_Thread extends Thread {

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName() + "--------------" + i);
        }
    }

    public static void main(String[] args) {
        P01_Thread threadDemo = new P01_Thread();
        threadDemo.start();
        for (int i = 0; i < 5; i++) {
            System.out.println(Thread.currentThread().getName() + "===========" + i);
        }

    }
}
